package com.koo.modules.purchase.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.koo.common.base.entity.CommonEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * @author charlin
 * @email 136137465@qq.com
 * @date 2023-03-03 11:43:30
 */
@Data
@ApiModel("")
@TableName("purchase_order")
public class PurchaseOrderEntity extends CommonEntity {
    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    @TableId
    private Long purchaseOrderId;

    @ColumnWidth(11)
    @ExcelProperty("采购单号")
    @ApiModelProperty(value = "采购单号")
    private String purchaseOrderNo;

    @ColumnWidth(11)
    @ExcelProperty("供应商id")
    @ApiModelProperty(value = "供应商id")
    private Long supplierId;

    @ColumnWidth(11)
    @ExcelProperty("供应商名称")
    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    @ColumnWidth(11)
    @ExcelProperty("采购日期")
    @ApiModelProperty(value = "采购日期")
    private String purchaseDate;

    @ColumnWidth(11)
    @ExcelProperty("总金额")
    @ApiModelProperty(value = "总金额")
    private BigDecimal totalFee;

    @ColumnWidth(11)
    @ExcelProperty("是否提交1是")
    @ApiModelProperty(value = "是否提交1是")
    private Integer isSubmit;

    @ColumnWidth(11)
    @ExcelProperty("审核人id")
    @ApiModelProperty(value = "审核人id")
    private Long auditUserId;

    @ColumnWidth(11)
    @ExcelProperty("审核人")
    @ApiModelProperty(value = "审核人")
    private String auditUser;

    @ColumnWidth(11)
    @ExcelProperty("审核状态")
    @ApiModelProperty(value = "审核状态")
    private Integer auditStatus;

    @ColumnWidth(11)
    @ExcelProperty("审核说明")
    @ApiModelProperty(value = "审核说明")
    private String auditNote;

    @ColumnWidth(11)
    @ExcelProperty("总部单号")
    @ApiModelProperty(value = "总部单号")
    private String headQuarterNo;

    @ColumnWidth(11)
    @ExcelProperty("采购人id")
    @ApiModelProperty(value = "采购人id")
    private Long purchaseUserId;

    @ColumnWidth(11)
    @ExcelProperty("采购人")
    @ApiModelProperty(value = "采购人")
    private String purchaseUser;

    @ExcelIgnore
    @ApiModelProperty(value = "明细")
    @TableField(exist = false)
    private List<PurchaseOrderDetailEntity> itemList = new ArrayList<>();

}
